package demo.java.java8.Lambdas.demo5;


import demo.java.java8.Lambdas.demo4.Dish;

import java.util.Arrays;
import java.util.List;

import static java.util.stream.Collectors.toList;

public class Test {

	public static void main(String[] args) {
//		List<Integer> number = Arrays.asList(1,2,1,3,4,2,4);
//		number.stream().filter(i -> i%2==0).distinct()
//		.forEach(System.out::println);

		List<String> words= Arrays.asList("Java 8", "Lambdas", "In", "Action");
		List<Integer> wordsLengs=words.stream()
				.map(String::length).collect(toList());

		System.out.println(wordsLengs);
	}


}
